home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XPutImage.z / XPutImage
Encoding:
Text File  |  1998-10-30  |  12.8 KB  |  265 lines

  1.  
  2.  
  3.  
  4.      XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))     XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XPutImage, XGetImage, XGetSubImage - transfer images
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           XPutImage(_d_i_s_p_l_a_y, _d, _g_c, _i_m_a_g_e, _s_r_c__x, _s_r_c__y, _d_e_s_t__x,
  13.           _d_e_s_t__y, _w_i_d_t_h, _h_e_i_g_h_t)
  14.                   Display *_d_i_s_p_l_a_y;
  15.                   Drawable _d;
  16.                   GC _g_c;
  17.                   XImage *_i_m_a_g_e;
  18.                   int _s_r_c__x, _s_r_c__y;
  19.                   int _d_e_s_t__x, _d_e_s_t__y;
  20.                   unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  21.  
  22.           XImage *XGetImage(_d_i_s_p_l_a_y, _d, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t,
  23.           _p_l_a_n_e__m_a_s_k, _f_o_r_m_a_t)
  24.                   Display *_d_i_s_p_l_a_y;
  25.                   Drawable _d;
  26.                   int _x, _y;
  27.                   unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  28.                   unsigned long _p_l_a_n_e__m_a_s_k;
  29.                   int _f_o_r_m_a_t;
  30.  
  31.           XImage *XGetSubImage(_d_i_s_p_l_a_y, _d, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t,
  32.           _p_l_a_n_e__m_a_s_k, _f_o_r_m_a_t, _d_e_s_t__i_m_a_g_e, _d_e_s_t__x,
  33.                                _d_e_s_t__y)
  34.                 Display *_d_i_s_p_l_a_y;
  35.                 Drawable _d;
  36.                 int _x, _y;
  37.                 unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  38.                 unsigned long _p_l_a_n_e__m_a_s_k;
  39.                 int _f_o_r_m_a_t;
  40.                 XImage *_d_e_s_t__i_m_a_g_e;
  41.                 int _d_e_s_t__x, _d_e_s_t__y;
  42.  
  43.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  44.           _d         Specifies the drawable.
  45.  
  46.           _d_e_s_t__i_m_a_g_e
  47.                     Specifies the destination image.
  48.  
  49.           _d_e_s_t__x
  50.           _d_e_s_t__y    Specify the x and y coordinates, which are
  51.                     relative to the origin of the drawable and are the
  52.                     coordinates of the subimage or which are relative
  53.                     to the origin of the destination rectangle,
  54.                     specify its upper-left corner, and determine where
  55.                     the subimage is placed in the destination image.
  56.  
  57.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  58.  
  59.           _f_o_r_m_a_t    Specifies the format for the image.  You can pass
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))     XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.                     _X_Y_P_i_x_m_a_p or _Z_P_i_x_m_a_p.
  75.  
  76.           _g_c        Specifies the GC.
  77.  
  78.           _i_m_a_g_e     Specifies the image you want combined with the
  79.                     rectangle.
  80.  
  81.           _p_l_a_n_e__m_a_s_k
  82.                     Specifies the plane mask.
  83.  
  84.           _s_r_c__x     Specifies the offset in X from the left edge of
  85.                     the image defined by the _X_I_m_a_g_e structure.
  86.  
  87.           _s_r_c__y     Specifies the offset in Y from the top edge of the
  88.                     image defined by the _X_I_m_a_g_e structure.
  89.  
  90.           _w_i_d_t_h
  91.           _h_e_i_g_h_t    Specify the width and height of the subimage,
  92.                     which define the dimensions of the rectangle.
  93.  
  94.           _x
  95.           _y         Specify the x and y coordinates, which are
  96.                     relative to the origin of the drawable and define
  97.                     the upper-left corner of the rectangle.
  98.  
  99.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  100.           The _X_P_u_t_I_m_a_g_e function combines an image with a rectangle of
  101.           the specified drawable.  The section of the image defined by
  102.           the src_x, src_y, width, and height arguments is drawn on
  103.           the specified part of the drawable.  If _X_Y_B_i_t_m_a_p format is
  104.           used, the depth of the image must be one, or a _B_a_d_M_a_t_c_h
  105.           error results.  The foreground pixel in the GC defines the
  106.           source for the one bits in the image, and the background
  107.           pixel defines the source for the zero bits.  For _X_Y_P_i_x_m_a_p
  108.           and _Z_P_i_x_m_a_p, the depth of the image must match the depth of
  109.           the drawable, or a _B_a_d_M_a_t_c_h error results.
  110.  
  111.           If the characteristics of the image (for example, byte_order
  112.           and bitmap_unit) differ from what the server requires,
  113.           _X_P_u_t_I_m_a_g_e automatically makes the appropriate conversions.
  114.  
  115.           This function uses these GC components: function, plane-
  116.           mask, subwindow-mode, clip-x-origin, clip-y-origin, and
  117.           clip-mask.  It also uses these GC mode-dependent components:
  118.           foreground and background.
  119.  
  120.           _X_P_u_t_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, _B_a_d_M_a_t_c_h, and
  121.           _B_a_d_V_a_l_u_e errors.
  122.  
  123.           The _X_G_e_t_I_m_a_g_e function returns a pointer to an _X_I_m_a_g_e
  124.           structure.  This structure provides you with the contents of
  125.           the specified rectangle of the drawable in the format you
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))     XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           specify.  If the format argument is _X_Y_P_i_x_m_a_p, the image
  141.           contains only the bit planes you passed to the plane_mask
  142.           argument.  If the plane_mask argument only requests a subset
  143.           of the planes of the display, the depth of the returned
  144.           image will be the number of planes requested.  If the format
  145.           argument is _Z_P_i_x_m_a_p, _X_G_e_t_I_m_a_g_e returns as zero the bits in
  146.           all planes not specified in the plane_mask argument.  The
  147.           function performs no range checking on the values in
  148.           plane_mask and ignores extraneous bits.
  149.  
  150.           _X_G_e_t_I_m_a_g_e returns the depth of the image to the depth member
  151.           of the _X_I_m_a_g_e structure.  The depth of the image is as
  152.           specified when the drawable was created, except when getting
  153.           a subset of the planes in _X_Y_P_i_x_m_a_p format, when the depth is
  154.           given by the number of bits set to 1 in plane_mask.
  155.  
  156.           If the drawable is a pixmap, the given rectangle must be
  157.           wholly contained within the pixmap, or a _B_a_d_M_a_t_c_h error
  158.           results.  If the drawable is a window, the window must be
  159.           viewable, and it must be the case that if there were no
  160.           inferiors or overlapping windows, the specified rectangle of
  161.           the window would be fully visible on the screen and wholly
  162.           contained within the outside edges of the window, or a
  163.           _B_a_d_M_a_t_c_h error results.  Note that the borders of the window
  164.           can be included and read with this request.  If the window
  165.           has backing-store, the backing-store contents are returned
  166.           for regions of the window that are obscured by noninferior
  167.           windows. If the window does not have backing-store, the
  168.           returned contents of such obscured regions are undefined.
  169.           The returned contents of visible regions of inferiors of a
  170.           different depth than the specified window's depth are also
  171.           undefined.  The pointer cursor image is not included in the
  172.           returned contents.  If a problem occurs, _X_G_e_t_I_m_a_g_e returns
  173.           NULL.
  174.  
  175.           _X_G_e_t_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_M_a_t_c_h, and _B_a_d_V_a_l_u_e
  176.           errors.
  177.  
  178.           The _X_G_e_t_S_u_b_I_m_a_g_e function updates dest_image with the
  179.           specified subimage in the same manner as _X_G_e_t_I_m_a_g_e.  If the
  180.           format argument is _X_Y_P_i_x_m_a_p, the image contains only the bit
  181.           planes you passed to the plane_mask argument.  If the format
  182.           argument is _Z_P_i_x_m_a_p, _X_G_e_t_S_u_b_I_m_a_g_e returns as zero the bits
  183.           in all planes not specified in the plane_mask argument.  The
  184.           function performs no range checking on the values in
  185.           plane_mask and ignores extraneous bits.  As a convenience,
  186.           _X_G_e_t_S_u_b_I_m_a_g_e returns a pointer to the same _X_I_m_a_g_e structure
  187.           specified by dest_image.
  188.  
  189.           The depth of the destination _X_I_m_a_g_e structure must be the
  190.           same as that of the drawable.  If the specified subimage
  191.           does not fit at the specified location on the destination
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))     XXXXPPPPuuuuttttIIIImmmmaaaaggggeeee((((3333XXXX11111111))))
  203.  
  204.  
  205.  
  206.           image, the right and bottom edges are clipped.  If the
  207.           drawable is a pixmap, the given rectangle must be wholly
  208.           contained within the pixmap, or a _B_a_d_M_a_t_c_h error results.
  209.           If the drawable is a window, the window must be viewable,
  210.           and it must be the case that if there were no inferiors or
  211.           overlapping windows, the specified rectangle of the window
  212.           would be fully visible on the screen and wholly contained
  213.           within the outside edges of the window, or a _B_a_d_M_a_t_c_h error
  214.           results.  If the window has backing-store, then the
  215.           backing-store contents are returned for regions of the
  216.           window that are obscured by noninferior windows. If the
  217.           window does not have backing-store, the returned contents of
  218.           such obscured regions are undefined.  The returned contents
  219.           of visible regions of inferiors of a different depth than
  220.           the specified window's depth are also undefined.  If a
  221.           problem occurs, _X_G_e_t_S_u_b_I_m_a_g_e returns NULL.
  222.  
  223.           _X_G_e_t_S_u_b_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, _B_a_d_M_a_t_c_h, and
  224.           _B_a_d_V_a_l_u_e errors.
  225.  
  226.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  227.           _B_a_d_D_r_a_w_a_b_l_e
  228.                     A value for a Drawable argument does not name a
  229.                     defined Window or Pixmap.
  230.  
  231.           _B_a_d_G_C     A value for a GContext argument does not name a
  232.                     defined GContext.
  233.  
  234.           _B_a_d_M_a_t_c_h  An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  235.  
  236.           _B_a_d_M_a_t_c_h  Some argument or pair of arguments has the correct
  237.                     type and range but fails to match in some other
  238.                     way required by the request.
  239.  
  240.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  241.                     values accepted by the request.  Unless a specific
  242.                     range is specified for an argument, the full range
  243.                     defined by the argument's type is accepted.  Any
  244.                     argument defined as a set of alternatives can
  245.                     generate this error.
  246.  
  247.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  248.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.